package com.example.forum_system.exception;

import com.example.forum_system.common.Result;

/**
 * @BelongsProject: 0.forum_system
 * @BelongsPackage: com.example.forum_system.common
 * @Author : 游在海里的鱼
 * @CreateTime : 2023-11-03  14:55
 * @Version : 1.0
 * @Description : 自定义异常
 */
public class AppException extends RuntimeException{
    protected Result errorResult;

    public Result getErrorResult() {
        return errorResult;
    }

    public AppException(Result result){
        super(result.getMessage());
        errorResult = result;
    }
    public AppException(String message) {
        super(message);
    }

    public AppException(String message, Throwable cause) {
        super(message, cause);
    }

    public AppException(Throwable cause) {
        super(cause);
    }
}
